This project is a production quality example of the Exago BI Folder Management extensibility feature. This is free for all Exago Inc. clients and prospective clients to use for any legal purpose, to modify, and to share; without accreditation.

For more information about Exago Folder Management, see https://support.exagoinc.com/hc/en-us/articles/215057928

The remainder of this README walks through how to set up the project. The following are prerequisites:
*   Microsoft Windows
*   Microsoft Visual Studio, with NuGet
*   SQL-based database

For assistance, please file a support ticket at https://support.exagoinc.com/hc/en-us/requests/new

1.  Use the provided SQL in "ExagoDatabase.sql.txt" to create the necessary database tables.

2.  Open the "ExagoExtensibility.sln" project file in Visual Studio.
    a.  Update the reference path for "WebReportsApi.dll" to the ./bin folder of your Exago installation.
    b.  Make sure that the reference path for "SQLUtils.dll" is to the included Resources folder (NOT the Exago ./bin folder).
    c.  Build the project.

3. Add the following lines to the Exago installation's "appSettings.config" file, between <appSettings></appSettings>:
    <add key="tnReports" value="Reports" />
    <add key="tnReportAccess" value="ReportAccess" />
    <add key="tnUserPreferences" value="UserPreferences" />

4. Add the following lines to the Exago installation's "web.config" file, directly above <system.web>. Change the CAPITALIZED text to the connection settings for your folder management database:
    <connectionStrings>
        <add name="DefaultConnection" connectionString="Server=SERVERNAME;Database=DATABASENAME;User ID=USERID;Password=PASSWORD;Trusted_Connection=False;" providerName="System.Data.SqlClient" />
    </connectionStrings>

5. Open the Exago Administration Console.
    Add the following Parameters, with default settings:
        userId
        companyId
        companyKeyId
        classId
    
    Change the following Administrative settings:
    *   In the following settings, change PATH_TO_EXTENSIBILITY_PROJECT to the path to the compiled Folder Management .dll file.
    
    Main Settings
        Report Path:   assembly=PATH_TO_EXTENSIBILITY_PROJECT\ExagoExtensibility.dll;class=ExagoExtensibility.FolderManagement
        Language File: ,en-us-extensibility
        *   (Add to the end of the Language File string)
    
    User Settings
        User Preference Storage Method: Sever Event
    
    Add DataSources
    1.  Name:             ActionEvents
        Type:             assembly
        connectionString: assembly=PATH_TO_EXTENSIBILITY_PROJECT\ExagoExtensibility.dll;class=ExagoExtensibility.ActionEvents
    
    2.  Name:             ServerEvents
        Type:             assembly
        connectionString: assembly=PATH_TO_EXTENSIBILITY_PROJECT\ExagoExtensibility.dll;class=ExagoExtensibility.ServerEvents
    
    Add Action Event
        Name:              onTreeNodeRightClick_SetRightClickMenu
        Function:          ActionEvents
        Method:            onTreeNodeRightClick_SetRightClickMenu
        Global Event Type: OnRightClickReport
    
    Add Server Events
    1.  Name:              getUserPreference
        Function:          ServerEvents
        Method:            getUserPreference
        Global Event Type: OnGetUserPreference
        
    2.  Name:              setUserPreference
        Function:          ServerEvents
        Method:            setUserPreference
        Global Event Type: OnSetUserPreference

6. In the Exago API, set values for the Parameters userId, companyId, companyKeyId, and classId.

7. Copy the file "en-us-extensibility.xml" to the Exago installation's ./Config/Languages folder.

8. If you are using Scheduler Services:
    a. Update each scheduler's report path in "eWebReportsScheduler.xml"
    b. copy the file "en-us-extensibility.xml" to each scheduler's ./Languages folder
	
9. If you are using the REST Api:
	a. Add the following lines to the ExagoAPI installation's "web.config" file, directly above <system.web>. Change the CAPITALIZED text to the connection settings for your folder management database:
		<connectionStrings>
			<add name="DefaultConnection" connectionString="Server=localhost;Database=DATABASE;uid=USER;pwd=PASSWORD;Trusted_Connection=False;"providerName="System.Data.SqlClient" />
		</connectionStrings>
	b. Add the following lines to the ExagoAPI installation's "appSettings.config" file, between <appSettings></appSettings>:
		<add key="tnReportAccess" value="ReportAccess" />
		<add key="tnReports" value="Reports" />